﻿using EntityModel.PageListInfor;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using System.Text.Json.Serialization;

namespace EntityModel.User
{

    /// <summary>
    /// 用户表
    /// </summary>
    [Table("Members")]
    public class AikeApplet_Members: Pagination
    {
        [Key]
        /// <summary>
        /// 主键
        /// </summary>
        public Guid userId { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string userName { get; set; }

        /// <summary>
        /// 真实姓名
        /// </summary>
        public string realName { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        public Gender gender { get; set; }

        /// <summary>
        /// 出生日期
        /// </summary>
        public DateTime? birthDate { get; set; }

        /// <summary>
        /// 密码
        /// </summary>
        public string password { get; set; }

        /// <summary>
        /// 旧密码
        /// </summary>
        public string passwordSalt { get; set; }

        /// <summary>
        /// 密码问题
        /// </summary>
        public string passwordQuestion { get; set; }

        /// <summary>
        /// 密码答案
        /// </summary>
        public string passwordAnswer { get; set; }

        /// <summary>
        /// 用户等级
        /// </summary>
        public int gradeId { get; set; }

        /// <summary>
        /// Email电子邮件
        /// </summary>
        public string email { get; set; }

        /// <summary>
        /// 手机号码
        /// </summary>
        public string mobilephone { get; set; }

        /// <summary>
        /// 电话
        /// </summary>
        public string telephone1 { get; set; }

        /// <summary>
        /// 身份证
        /// </summary>
        public string identityCard { get; set; }

        /// <summary>
        /// 交易密码
        /// </summary>
        public string tradePassword { get; set; }

        /// <summary>
        /// QQ
        /// </summary>
        public string QQ { get; set; }

        /// <summary>
        /// 微信
        /// </summary>
        public string weChat { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        public string picture { get; set; }

        /// <summary>
        /// 是否一键登录
        /// false:否
        /// true:是
        /// </summary>
        public bool isQuickLogin { get; set; }

        /// <summary>
        /// 登录状态：
        /// 1:已登录
        /// 2:已退出
        /// </summary>
        public int isLogined { get; set; }

        /// <summary>
        /// 地址
        /// </summary>
        public string address { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime createDate { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime modifiedon { get; set; }
    }

    public class PositionInfo
    {
        /// <summary>
        /// 纬度
        /// </summary>
        public double latitude { get; set; }

        /// <summary>
        /// 经度
        /// </summary>
        public double longitude { get; set; }

        public PositionInfo(double lat, double lon)
        {
            latitude = lat;
            longitude = lon;
        }

        /// <summary>
        /// 所在市ID
        /// </summary>
        //[JsonIgnore]:在实体类向前台返回数据时用来忽略不想传递给前台的属性或接口。
        [JsonIgnore]
        public int cityId { get; set; }

        /// <summary>
        /// 所在区域ID【街道ID】
        /// </summary>
        public int areaId { get; set; }
    }
}
